using System.Configuration;

namespace App.Modelo.Config
{
    public class ModulosSettingCollection : ConfigurationElementCollection
    {
        public ModuloSettingElements this[int index]
        {
            get
            {
                return base.BaseGet(index) as ModuloSettingElements;
            }
            set
            {
                if (base.BaseGet(index) != null)
                {
                    base.BaseRemoveAt(index);
                }
                this.BaseAdd(index, value);
            }
        }
        protected
            override System.Configuration.ConfigurationElement CreateNewElement()
        {
            return new ModuloSettingElements();
        }

        protected override object GetElementKey(
            System.Configuration.ConfigurationElement element)
        {
            return ((ModuloSettingElements)element).AssemblyName;
        }
    }
}